//
//  FilterDataTableCell.m
//  Toyota
//
//  Created by ld on 2024/6/26.
//

#import "FilterDataTableCell.h"
#import "Definition.h"
#import "Helper.h"
@implementation FilterDataTableCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

+ (instancetype)sortCell
{
    return [[self alloc] init];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self makeSubViews];
        self.customWidth = ScreenWidth;
    }
    return self;
}

- (void)makeSubViews
{
    // 添加对勾
    self.markView.frame = CGRectMake(ScreenWidth - 11 - 25, 0, 15, 15);
    self.markView.image = [UIImage imageNamed:@"choice_img_red"];
    [self addSubview:self.markView];
    // 默认不显示
    self.markView.hidden = YES;
    // 设置居中
    self.markView.customY = self.customHeight/2. - 7.5;
    
    // 添加线条
    UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(10, self.customHeight - 1, ScreenWidth - 20, 1)];
    lineView.backgroundColor = kColorEDEDED;
    lineView.alpha = 0.5;
    [self addSubview:lineView];
    
}

#pragma mark - lazyload
- (UIImageView*)markView
{
    if (!_markView) {
        UIImageView *markView=[[UIImageView alloc] init];
        _markView = markView;
    }
    return _markView;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
@end
